/**
 * Created by Administrator on 15-10-8.
 */
window.onload=function() {
    var id = $.getUrlParam("id");
    var url=getUrl();
    //看过的人
    $.jsonp({
        url: 'http://'+url+'/api/sameway/look_number-'+ id,
        data: {},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            $("#looknumber").text(data.lookNumber);

            $.each(data.arrays, function (index, ele) {
                var sex = "female";
                if (ele.sex == 1)
                    sex = "male";
                var html = '<li>' +
                    '<div class="order-list-avatar">' +
                    '<img src="' + ele.photo + '" alt="">' +
                    '</div>' +
                    '<div class="order-list-intro">' +
                    '<div class="order-list-intro-text">' +
                    '<p class="color666 fz16">' + ele.nickName + '</p>' +
                    '<p class="color666 fz14">' +
                    '<span class="sex sex-female no-left"><i class="icons-sex-female"></i>'+ ele.age + '</span></p>' +
                    '</div>' +
                    '</div>' +
                    '</li>';
                $(".ma_con02 ").append(html)
            })
        },
        error: function (xOptions, textStatus) {
        }
    });
    var id = $.getUrlParam("id");
    //评论过的人
    $.jsonp({
        url: 'http://'+url+'/api/sameway/comment_list-' + id,
        data: {},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            $("#looknumber").text(data.lookNumber);

            $.each(data.arrays, function (index, ele) {
                var sex = "female";
                if (ele.sex == 1)
                    sex = "male";
                var html = '<li>' +
                    '<div class="order-list-avatar">' +
                    '<img src="' + ele.photo + '" alt="">' +
                    '</div>' +
                    '<div class="order-list-intro">' +
                    '<div class="order-list-intro-text">' +
                    '<p class="color666 fz16">' + ele.nickName + '</p>' +
                    '<p class="color666 fz14">' +
                    '<span class="sex sex-female no-left"><i class="icons-sex-female"></i>' + ele.age + '</span></p>' +
                    '</div>' +
                    '</div>' +
                    '</li>' +
                    $(".ma_con03 ").append(html)
            })
        },
        error: function (xOptions, textStatus) {
        }
    });
    var id = $.getUrlParam("id");
    //已报名的人数
    $.jsonp({
        url: 'http://'+url+'/api/sameway/assist_sameway-' + id,
        data: {},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            $("#looknumber").text(data.lookNumber);

            $.each(data.arrays, function (index, ele) {
                var sex = "female";
                if (ele.sex == 1)
                    sex = "male";
                var html = '<li>' +
                    '<div class="order-list-avatar">' +
                    '<img src="' + ele.photo + '" alt="">' +
                    '</div>' +
                    '<div class="order-list-intro">' +
                    '<div class="order-list-intro-text">' +
                    '<p class="color666 fz16">' + ele.nickName + '</p>' +
                    '<p class="color666 fz14">' +
                    '<span class="sex sex-female no-left"><i class="icons-sex-female"></i>' + ele.age + '</span></p>' +
                    '</div>' +
                    '</div>' +
                    '</li>' +
                    $(".ma_con04 ").append(html)
            })
        },
        error: function (xOptions, textStatus) {
        }
    });
}